//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "letter.h"
#include "datamodule.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TLetterBlank *LetterBlank;
//---------------------------------------------------------------------------
__fastcall TLetterBlank::TLetterBlank(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TLetterBlank::Button1Click(TObject *Sender)
{
        InitRep();
        QuickRep1->Preview();
}
//---------------------------------------------------------------------------
void __fastcall TLetterBlank::Button2Click(TObject *Sender)
{
        InitRep();
        QuickRep1->Print();
}
//---------------------------------------------------------------------------
void __fastcall TLetterBlank::FormShow(TObject *Sender)
{
        InitRep();

}
//---------------------------------------------------------------------------
void __fastcall TLetterBlank::InitRep(void)
{
         QRLabel5->Caption = dm->adStudents->FieldByName("Familia")->AsString + " "
                                + dm->adStudents->FieldByName("Name")->AsString.SubString(1,1) + ". "
                                + dm->adStudents->FieldByName("Otchestvo")->AsString.SubString(1,1) + ".";
        QRLabel6->Caption = dm->adStudents->FieldByName("Country")->AsString + ", " +
         dm->adStudents->FieldByName("City")->AsString;
        QRLabel7->Caption = dm->adStudents->FieldByName("Street_String")->AsString;
        QRLabel8->Caption = dm->adStudents->FieldByName("Post_Index")->AsString;

}
